/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardHouse.cards;

/**
 *
 * @author sam
 */
public class Card {
    
   private boolean m_isDrawn; /* toggled to true when card is dealt and the deck will 
	void setDrawn(bool drawn);   reset to false with the shuffle() function */
   private FaceValue m_faceValue;
   private Suit m_suit;
   
enum Suit     { HEARTS, DIAMONDS, CLUBS, SPADES}
enum FaceValue{ DUCE, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE}

    protected Card(FaceValue  faceValue, Suit cardSuit){
            this.m_suit      = cardSuit;
            this.m_faceValue = faceValue;
            this.m_isDrawn   = false;
    }
    
    protected  Card() {
    }
    
    private Card(Card card) {
    }

    protected void setFaceValue(FaceValue newValue){
        this.m_faceValue = newValue;
    }
    
    protected void setSuit(Suit newSuit){
        this.m_suit = newSuit;
    }
    
    //why protected? we dont want people peeking into the deck to see if a card is drawn or not
    protected void setDrawn(boolean drawn){
        m_isDrawn = drawn;
    }
    
    //why protected? we dont want people peeking into the deck to see if a card is drawn or not
    protected boolean getisDrawn(){
        return m_isDrawn;
    }

    public FaceValue getFacevalue(){
      return m_faceValue;     
    }
    
    /**
     *
     * @return
     */
    public Suit getSuit(){
           return m_suit; 
    }
    
    @Override
    public String toString(){
        String cardStringValue = "Face value = " + this.m_faceValue + ", Suit = " + this.m_suit;
        return cardStringValue;
    }
}
